package com.sky.mapper;

import com.sky.entity.OrderDetail;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderDetailMapper {
    /**
     * 插入多条订单详细数据
     * @param orderDetailList
     */
    void insert(List<OrderDetail> orderDetailList);


    /**
     * 根据订单id获取该订单详细数据
     * @param orderId
     * @return
     */
    @Select("select * from order_detail where order_id = #{orderId}")
    List<OrderDetail> getDetailsByOrderId(Long orderId);
}
